<div {guanlians}>
	<div class="form-group-title" ng-if="'{title}'">
		{title}
	</div>
	<div class="table-responsive" ng-class="{'panel-body':'{title}'}" ng-init="checkarray({tovalue},'{name}')">
			<table class="table jinyun-table table-hover vertical-middle jinyun-form">
				<thead>
					<tr>
						<th ng-repeat="th in {fields}" style="word-break : break-all;">{{check_show_lang(th.title,th.en_title)}}</th>
						<th ng-if="{read}==false" class="text-right" style="word-break : break-all;">操作</th>
					</tr>
				</thead>
				<tbody id="re-items">
					<tr ng-repeat="(itemk,item) in {tovalue}.{name}">
						<td ng-repeat="(tdk,td) in {fields}" ng-style="{'background-color':ifelse({read},'#f7f7f7','')}">
							<img ng-if="td.type=='image'" ng-click="image(item,td.name)" ng-src="{{tomedia(item[td.name]) || '../core/resource/images/nopic-small.jpg'}}" style="width:40px;height:40px;padding:1px;border:1px solid #ccc;"/>
							<input ng-readonly="{read}" class="form-control" ng-if="td.type=='string'"  type="text" ng-model="item[td.name]"/>
							<input class="form-control" ng-if="td.type=='time'" type="text" readonly="readonly" id="datetimepicker_{{itemk}}_{{td.name}}" ng-model="item[td.name]" ng-init="time_one(item,td.name,'datetimepicker_'+itemk+'_'+td.name,td.time_type)" />
							<textarea ng-readonly="{read}" ng-if="td.type=='text'" class="form-control" ng-model="item[td.name]" cols="50" placeholder="{{item[td.placeholder]}}"></textarea>
							<select ng-disabled="{read}" ng-if="td.type=='radio'" ng-model="item[td.name]">
								<option ng-repeat="(v,t) in pagedata[td.options]" value="{{v}}"  ng-selected="item[td.name]==v">{{t}}</option>
							</select>
							<select ng-disabled="{read}" ng-if="td.type=='select'" ng-model="item[td.name]">
								<option ng-repeat="v in pagedata[td.options]" value="{{v[td.option_value]}}"  ng-selected="item[td.name]==v[td.option_value]">{{v[td.option_title]}}</option>
							</select>
							<label ng-if="td.type=='switch'" style="padding-top:10px">
								<div ng-if="item[td.name]==1" class="switch switchOn" ng-click="item[td.name]=0"></div>
								<div ng-if="item[td.name]!=1" class="switch" ng-click="item[td.name]=1"></div>
							</label>
							<span ng-if="td.type=='string_much'" ng-repeat="tdd in td.fields" class="input-group-addon">
								{{tdd.title}}
								<input ng-readonly="{read}" ng-if="tdd.name" type="text" style="width:50px" class="form-control " ng-model="item[tdd.name]" />
							</span>
							<button ng-if="td.type=='time_range'" class="btn btn-primary daterange daterange-date" id="daterange-date-{name}-{{itemk}}-{{tdk}}" ng-init="time_range(item,td.name,'daterange-date-{name}-'+itemk+'-'+tdk,{read})" type="button">
							<span class="date-title">至</span> <i class="fa fa-calendar"></i>
							</button>
						</td>
						<td class="text-right" ng-if="{read}==false">
							<a href="javascript:;" title="上移" ng-if="$index>0" ng-click="{tovalue}.{name}.splice($index-1,0,item);{tovalue}.{name}.splice($index+1,1)" class="btn btn-primary btn-sm">上移</a>
							<a href="javascript:;" ng-click="{tovalue}.{name}.splice($index,1)" title="删除此条目" class="btn btn-danger btn-sm"><i class="fa fa-times"></i></a> &nbsp;
						</td>
					</tr>
					<tr ng-if="{read}==false">
						<td class="text-left">
							<a class="color-gray add-new-keyword" href="javascript:;" ng-click="checkarray({tovalue},'{name}');newfield={default};{tovalue}.{name}.push(newfield);">
								<span class="add-icon"><i class="fa fa-plus"></i></span>
								<span class="text">{add_tip}</span>
							</a>
						</td>
					</tr>
				</tbody>
			</table>
	</div>

</div>

